<!DOCTYPE html>
<html lang="en" xmlns:th=http://www.thymeleaf.org>
<head>
    <meta charset="UTF-8">
    <title>添加房间</title>
</head>
<link rel="stylesheet" th:href="@{/css/add.css}"/>
<script type="text/javascript" src="/js/jq.js"></script>
<body>
<div class="di">
    <form th:action="@{/insertfF}">
        <table  class="tb">
            <tr>
                <td>房间号：</td>
                <td>
                    <input type="text" name="fh" id="fjh"/>
                </td>

            </tr>
            <tr>
                <td>房间类型的id ：</td>
                <td>
                    <input type="text" name="rid" id="rid"/>
                </td>
            </tr>

        </table>
        <input type="submit" value="添加" class="btn" id="btn"/>
    </form>
</div>
<script>
    $(function () {
        $("#btn").click(function () {
            if($("fjh").val()=="" || $("#rid").val()==""){
                alert("信息不能为空")
            }
        })
    })
</script>

</body>
